When two people are described as being two peas in a pod, it means that they look, act, or seem extremely similar. It can also mean that the people are emotionally very close.
The older form of this expression is as like as two peas, omitting the issue of whether the peas come from the same pod or not. But two peas from the same pod are certainly more likely to look identical than any two random peas, since they're the same type, come from the same plant, and grew under the same conditions. Likewise, things that are two peas in a pod are so like each other that you can barely tell them apart.